.gallery {
  padding: 2rem;
  max-width: none;
  margin: 0 auto;
}


.title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
  max-width: none;
  width: 100%;
}

.fullWidth {
  max-width: 100%;
  width: 100%;
  padding: 1rem;
}

.card {
  position: relative;
  border-radius: 8px;
  background-color: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 280px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.cardHeader {
  padding: 1rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  flex-shrink: 0;
}

.cardThumbnail {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f5f5;
}


.cardTitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: #00006F;
  display: block;
  margin-bottom: 0.5rem;
}

.cardDescription {
  font-size: 0.95rem;
  color: #444;
  margin: 0.5rem 0 1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tag {
  display: inline-block;
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
}

.tag_atlas {
  background-color: #10bd97;
}

.tag_connectome {
  background-color: #ffc000;
  color: black;
}

.tag_mesh {
  background-color: #70ad47;
}

.tag_stat {
  background-color: #d00031;
}

.tag_tract {
  background-color: #ed7d31;
}

.tag_voxel {
  background-color: #0a9bd5;
}

html[data-theme='dark'] .card {
  background-color: #3c3c3e; /* softer dark gray */
}

html[data-theme='dark'] .cardHeader {
  background-color: #7f7f7f;
  border-bottom: 1px solid #444;
}
